﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DOMercury.Engine;
using DOMercury.Interfaces;
using DOMercury.Items;

namespace NirCmdPlugin
{
    public class DialogActionProvider : IActionProvider
    {
        private List<IAction> actions;

        public DialogActionProvider()
        {
            actions = new List<IAction>();
            actions.Add(new ClickAction());
        }
        #region IActionProvider Members

        public string Name
        {
            get { return "DialogActionProvider"; }
        }

        public string Description
        {
            get { return "Provides actions for the DialogItem"; }
        }

        public string ItemType
        {
            get { return "DialogItem"; }
        }

        public List<IAction> Actions
        {
            get { return actions; }
        }

        public bool HasOptions
        {
            get { return false; }
        }

        public void ShowOptions()
        {
            //DO NOTHING
        }

        #endregion
    }

    public class SystemWindowActionProvider : IActionProvider
    {
        private List<IAction> actions;

        public SystemWindowActionProvider()
        {
            actions = new List<IAction>();
            actions.Add(new ClickAction());
        }
        #region IActionProvider Members

        public string Name
        {
            get { return "SystemWindowActionProvider"; }
        }

        public string Description
        {
            get { return "Provides actions for the SystemWindowItem"; }
        }

        public string ItemType
        {
            get { return "SystemWindowItem"; }
        }

        public List<IAction> Actions
        {
            get { return actions; }
        }

        public bool HasOptions
        {
            get { return false; }
        }

        public void ShowOptions()
        {
            //DO NOTHING
        }

        #endregion
    }

    public class PrintActionProvider : IActionProvider
    {
        private List<IAction> actions;

        public PrintActionProvider()
        {
            actions = new List<IAction>();
            actions.Add(new PrintAction());
        }
        #region IActionProvider Members

        public string Name
        {
            get { return "PrintActionProvider"; }
        }

        public string Description
        {
            get { return "Provides Print action for the .* file types"; }
        }

        public string ItemType
        {
            get { return ".*"; }
        }

        public List<IAction> Actions
        {
            get { return actions; }
        }

        public bool HasOptions
        {
            get { return false; }
        }

        public void ShowOptions()
        {
            //DO NOTHING
        }

        #endregion
    }

    public class MonitorActionProvider : IActionProvider
    {
        private List<IAction> actions;

        public MonitorActionProvider()
        {
            actions = new List<IAction>();
            actions.Add(new MonitorTurnOffAction());
        }
        #region IActionProvider Members

        public string Name
        {
            get { return "MonitorActionProvider"; }
        }

        public string Description
        {
            get { return "Provides actions for the Monitor"; }
        }

        public string ItemType
        {
            get { return "MonitorItem"; }
        }

        public List<IAction> Actions
        {
            get { return actions; }
        }

        public bool HasOptions
        {
            get { return false; }
        }

        public void ShowOptions()
        {
            //DO NOTHING
        }

        #endregion
    }

    public class LockWorkstationActionProvider : IActionProvider
    {
        private List<IAction> actions;

        public LockWorkstationActionProvider()
        {
            actions = new List<IAction>();
            actions.Add(new WorkstationLockAction());
        }
        #region IActionProvider Members

        public string Name
        {
            get { return "LockWorkstationActionProvider"; }
        }

        public string Description
        {
            get { return "Provides actions for the Lock Workstation"; }
        }

        public string ItemType
        {
            get { return "LockWorkstationItem"; }
        }

        public List<IAction> Actions
        {
            get { return actions; }
        }

        public bool HasOptions
        {
            get { return false; }
        }

        public void ShowOptions()
        {
            //DO NOTHING
        }

        #endregion
    }

    public class ServiceActionProvider : IActionProvider
    {
        private List<IAction> actions;

        public ServiceActionProvider()
        {
            actions = new List<IAction>();
            actions.Add(new ServiceChangeModeAction());
            actions.Add(new ServiceStartAction());
            actions.Add(new ServiceStopAction());
            actions.Add(new ServiceEnableAndStartAction());
        }
        #region IActionProvider Members

        public string Name
        {
            get { return "ServiceActionProvider"; }
        }

        public string Description
        {
            get { return "Provides actions for Windows Services"; }
        }

        public string ItemType
        {
            get { return "ServiceItem"; }
        }

        public List<IAction> Actions
        {
            get { return actions; }
        }

        public bool HasOptions
        {
            get { return false; }
        }

        public void ShowOptions()
        {
            //DO NOTHING
        }

        #endregion
    }

    public class SystemWindowActionProvider : IActionProvider
    {
        private List<IAction> actions;

        public SystemWindowActionProvider()
        {
            actions = new List<IAction>();
            actions.Add(new SystemWindowCenterAction());
            actions.Add(new SystemClickAction());
            actions.Add(new SystemWindowDockLeftAction());
            actions.Add(new SystemWindowDockRightAction());
            actions.Add(new SystemWindowDockTopAction());
            actions.Add(new SystemWindowDockBottomAction());
            
        }
        #region IActionProvider Members

        public string Name
        {
            get { return "SystemWindowActionProvider"; }
        }

        public string Description
        {
            get { return "Provides actions for System Windows"; }
        }

        public string ItemType
        {
            get { return "SystemWindowItem"; }
        }

        public List<IAction> Actions
        {
            get { return actions; }
        }

        public bool HasOptions
        {
            get { return false; }
        }

        public void ShowOptions()
        {
            //DO NOTHING
        }

        #endregion
    }


}
